<?php
/*一二三*/
/*
$context = stream_context_create(array(
	'http' => array(
		'method' => 'get',
		'header'  => array(
			"Authorization: Basic ".base64_encode("dujia".':'."sfglhnh"),
			"Content-type: application/x-www-form-urlencoded; charset=gb2312",
			"Range: bytes=0-2"
		),
		'content' => http_build_query(array('test' => 'test')),
		'timeout' => 10
	),
));
$ret = file_get_contents('http://go.cga.com.cn/1/EnterHouse/1/69/3/8424/0/223784832/8da3840d');
print_r($ret);
 */
function do_post($url, $data){
	$ch = curl_init();        
	curl_setopt($ch, CURLOPT_HEADER,0);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_POST, 1);
	$data = http_build_query($data);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	$lst['ret'] = curl_exec($ch);
	$lst['info'] = curl_getinfo($ch);
	curl_close($ch);
	return $lst;
}
$ret = do_post(
	'http://core3.ppstream.com/index.php?act=admin/list_global_param/update_cookiecheckxml_data&shell=1',
	array(
		'update'	=> 'true',
		'ver'		=> '1.2.3.4',
		'url'		=> 'http://tester.com',
	)
);
print_r($ret['ret']);
